﻿
using System ;
using System.Windows.Forms ;

using MskEdit.Dxf.Model ;


namespace MskEdit.Dxf.Frontend
{

    public class DxfHeaderTreeNode : TreeNode 
    {
        private DxfHeader dxfHeader_ ;
        
        
        public static DxfHeaderTreeNode TryFrom( DxfHeader dxfHeader, DxfHeaderTreeNode fallbackValue ) {
        
            if ( dxfHeader == null )
                return fallbackValue ;
                
            return new DxfHeaderTreeNode( dxfHeader ) ;
        }
        
        
        public DxfHeaderTreeNode( DxfHeader dxfHeader ) {
        
            dxfHeader_ = dxfHeader ;
            this.Text = "Header " + dxfHeader["$ACADVER"] ;
        }
    }
}
